package com.example.spring_transaction.mapper;

import com.example.spring_transaction.model.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {

    @Insert("insert into user_info(user_name,password) values(#{userName},#{password})")
    Integer insert(@Param("userName") String userName, @Param("password") String password);

    @Select("select * from userinfo where username = #{userName}")
    UserInfo selectByName(String userName);
}
